<%@ page contentType="text/html;charset=utf-8" isELIgnored="false"%>
<%@page import="com.jytc.framework.utils.SessionUtils"%>
<%@page import="com.jytc.framework.po.FwRole"%>
<%@page import="com.jytc.framework.constants.SessionNameConstants"%>
<%@page import="com.jytc.framework.commons.AdminLoginToken"%>
<%@page import="java.util.List"%>
<HTML>
	<HEAD>
		<TITLE>TOP</TITLE>
		<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
		<LINK href="../css/top.css" rel="stylesheet" type="text/css">

	</HEAD>
	<BODY>
	<%
	    AdminLoginToken loginToken = (AdminLoginToken) SessionUtils.getObjectAttribute(request, SessionNameConstants.ADMIN_LOGIN_TOKEN);
		String userName ="";
		String userRole = "";
		if(loginToken!=null)
		{
			userName = loginToken.getFwUser().getUserName();
			List<FwRole> frameSysRoles = loginToken.getFwRoles();
			for(FwRole frameSysRole:frameSysRoles)
			{
				userRole+=frameSysRole.getRoleName()+" ";
			}
		}
	%>
		<table width="100%" height="36" border="0" cellpadding="3" cellspacing="0">
			<form name="logout_form" method="post" action="/admin/jsp/sysLogin.do?method=loginOut" target="_top">
			</form>
			<tr>
				<td height="2" colspan="2"></td>
			</tr>
			<tr>
				<td width="45%" height="36" background="../images/forum_r1_c1.gif" style="padding-left: 10px;">
					<img src="../images/admin_logo.gif" border="0">
				</td>
				<td width="55%" align="right" valign="middle" background="../images/forum_r1_c1.gif" style="padding-right: 5px; font-size: 11px;">
					Version: V1.0&nbsp; |&nbsp; &copy;2009 &nbsp; Powered By XWTECH
				</td>
			</tr>
		</table>
		<table width="100%" height="35px" border="0" cellpadding="3" cellspacing="0">
			<tr>
				<td height="2"></td>
				<td align="right" valign="middle"></td>
			</tr>
			<tr>
				<td width="51%" height="32" bgcolor="#FFFFFF" class="tpl" style="padding-left: 10px;">
					<a class="pre" href="javascript:top.main.history.go(-1);">后退</a>
					<a class="ne" href="javascript:top.main.history.go(1);">前进</a>
					<a class="flush" href="javascript:top.main.location.reload();">刷新</a>
					<a class="logout" href="javascript:logout();">退出</a>
				</td>
				<td width="49%" align="right" valign="middle" bgcolor="#FFFFFF" class="tpl">
					<span style="font-size: 12px; padding-right: 12px;"><img src="../images/account.gif" alt="当前登录" width="19" height="20"
							align="absmiddle"> <%=userName %>&nbsp;&nbsp;&nbsp;<img src="/admin/images/group.gif" alt="角色" width="26" height="19"
							align="absmiddle">  <%=userRole %>&nbsp;&nbsp;&nbsp; </span>
							
				</td>
			</tr>
		</table>

		<SCRIPT language="JavaScript">
<!--

function logout()
{
	if (confirm("确认退出系统吗？"))
	{
		document.logout_form.submit();
	}
}
-->
</SCRIPT>
	</BODY>
</HTML>
